// $Header: $
// Copyright (c) CODE Consulting and Development, s.r.o., Plzen. All rights reserved.
// ConsoleApplication1.cpp : main project file.
//
// Find all latest examples here: https://opclabs.doc-that.com/files/onlinedocs/OPCLabs-OpcStudio/Latest/examples.html .
#include "stdafx.h"
using namespace OpcLabs::EasyOpc::DataAccess;
using namespace System;
int main(array<System::String ^> ^args)
{
EasyDAClient^ client = gcnew EasyDAClient();
Console::WriteLine("Reading item...");
// ReadItemValue is an extension method on the IEasyDAClient interface; need to call it explicitly in C++/CLR.
Console::WriteLine(IEasyDAClientExtension::ReadItemValue(client, "", "OPCLabs.KitServer.2", "Demo.Ramp"));
Console::WriteLine("Press Enter to continue...");
Console::ReadLine();
return 0;
}